import { Application } from 'egg';

export default (app: Application) => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;
  const avatarSchema = new Schema({
    url: { type: String },
    createDate: { type: Date },
  });
  return mongoose.model('avatar', avatarSchema);
}
